@select-border-color: rgba(0, 127, 255, 0.5);
@select-background-color: rgb(222, 238, 255);
@shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),0 3px 6px -4px rgba(0, 0, 0, 0.12),0 9px 28px 8px rgba(0, 0, 0, 0.05);
.disabled {
    color: #999;
    cursor: not-allowed;
}

.web-excel {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    .web-excel-warp{
        max-height: 100%;
        position: relative;
        overflow: auto;
    }
    &::after{
        content: "";
        width: 100%;
        flex: 1;
        border-top: .5px solid #ddd;
        transform: translateY(-1px);
    }

    .web-excel-grid{
        display: grid;
    }

    .cell {
        display: flex;
        align-items: center;
        padding: 2px;
        min-height: 24px;
        border: 1px solid #ddd;
        user-select: none;
        // content-visibility: auto;
        // contain-intrinsic-size: auto;
        &.edit-ready,
        &.edit-doing{
            user-select: unset;
        }
        &.selected{
            position: relative;
            background-color: @select-background-color;
            &::after{
                content: "";
                position: absolute;
                pointer-events: none;
            }
            &.row-index{
                background-color: @select-background-color;
            }
        }
        &.selected-first-col-cell{
            &::after{
                border-left: 0.5px solid @select-border-color;
                left: -0.5px;
                top: -0.5px;
                bottom: -0.5px;
            }
        }
        &.selected-first-row-cell{
            &::after{
                border-top: 0.5px solid @select-border-color;
                left: -0.5px;
                top: -0.5px;
                right: -0.5px;
            }
        }
        &.selected-last-col-cell{
            &::after{
                border-right: 0.5px solid @select-border-color;
                right: -0.5px;
                top: -0.5px;
                bottom: -0.5px;
            }
        }
        &.selected-last-row-cell{
            &::after{
                border-bottom: 0.5px solid @select-border-color;
                right: -0.5px;
                bottom: -0.5px;
                left: -0.5px;
            }
        }

        &.disabled *{
            pointer-events: none;
        }
        &.row-index{
            justify-content: center;
            background-color: #f1f1f1;
            color:#555;
        }
    }

    .head {
        background-color: #f1f1f1;
        font-weight: 700;
        position: sticky;
        top: 0;
        z-index: 10;
        &:not(:first-of-type){
            border-left: none;
        }
    }

    .body {
        &:not(.row-first-cell){
            border-left: none;
        }
        &.first-row{
            border-top: none;
        }
        &:not(.last-row){
            border-bottom: none;
        }
    }

    .grid-radio,
    .grid-checkbox{
        display: inline-flex;
        align-items: center;
        margin-inline-end: 4px;
    }

    .edit-control-components {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        overflow: hidden;
        font-size: 1em;
        resize: none;
        outline: none;
        border: none;
        bottom: 100%;
        padding: 0;
        font-family: 'inherit';
        opacity: 0;
        &.visible{
            opacity: 1;
            bottom: 0;
        }
    }
}

.edit-controller{
    &.ready{
        opacity: 0;
        width: 0px;
    }
}
.grid-contextmenu {
    position: fixed;
    z-index: -1;
    opacity: 0;
    background-color: #fff;
    box-shadow: @shadow;
    &.show{
        opacity: 1;
        z-index: 9999;
        padding: 4px;
        border-radius: 4px;
        min-width: 120px;
    }
    .grid-contextmenu-item{
        padding: 6px 10px;
        &:hover{
            background-color: rgba(0, 0, 0, 0.04);
            cursor: pointer;
        }
        &.disabled{
            .disabled;
        }
    }
}